
If ProcessExists("Rogue Tools.exe") Then
	$f = 0
Else
	MsgBox(4096, "Rogue Tools?", "You need to be running Rogue Tools in order to use this control")
	Exit
EndIf

$fileen = FileOpen(@ProgramFilesDir & "\burnersware\Rogue Tools\include\vars\enhancevars.txt", 0)
$speeden = FileReadLine($fileen, 1)
$spellnumberen = FileReadLine($fileen, 2) + 1
FileClose($fileen)

Global $resa = @DesktopWidth
Global $resb = @DesktopHeight
Global $winadded = $resa + $resb

If $winadded <> 1400 And $winadded <> 1792 And $winadded <> 2304 And $winadded <> 2800 Then
	nowinres()
EndIf

GUICreate("Rogue Enhancing", 550, 380, -1, -1, -1, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
GUICtrlCreatePic(@ProgramFilesDir & "\burnersware\Rogue Tools\Include\img\burnerssidebarenhance.jpg", 0, 22, 155, 360)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("Bot Program Speed", 365, 80, 170, 75)
$speednumbere = GUICtrlCreateSlider(377, 95, 150, 30)
GUICtrlSetLimit(-1, 3, 1)
If $speeden = 1 Then
	GUICtrlSetData($speednumbere, 1)
EndIf
If $speeden = 2 Then
	GUICtrlSetData($speednumbere, 2)
EndIf
If $speeden = 3 Then
	GUICtrlSetData($speednumbere, 3)
EndIf
GUICtrlCreateLabel("Slow", 377, 130, 50, 20)
GUICtrlSetFont(-1, 9, 450)
GUICtrlSetColor(-1, 0xff0000)
GUICtrlCreateLabel("Standard", 427, 130, 55, 20)
GUICtrlSetFont(-1, 9, 450)
GUICtrlSetColor(-1, 0xff0000)
GUICtrlCreateLabel("Ultra", 500, 130, 30, 20)
GUICtrlSetFont(-1, 9, 450)
GUICtrlSetColor(-1, 0xff0000)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("Current Spells", 170, 80, 170, 120)
$spell1 = GUICtrlCreateCheckbox("Cure I,II,III,IV,V", 175, 95, 118, 20)
$spell2 = GUICtrlCreateCheckbox("Protect I,II,III,IV", 175, 115, 118, 20)
$spell3 = GUICtrlCreateCheckbox("Shell I,II,III,IV", 175, 135, 118, 20)
$spell4 = GUICtrlCreateCheckbox("~Spikes Blaze,Shock,etc", 175, 155, 122, 20)
$spell5 = GUICtrlCreateCheckbox("En~ Thunder,Stone, etc", 175, 175, 132, 20)
$spell6 = GUICtrlCreateCheckbox("+1", 300, 100, 30, 20)
$spell7 = GUICtrlCreateCheckbox("+1", 300, 120, 30, 20)
$spell8 = GUICtrlCreateCheckbox("+1", 300, 140, 30, 20)
$spell9 = GUICtrlCreateCheckbox("+1", 300, 160, 30, 20)
If $spellnumberen = 1 Then
	GUICtrlSetState($spell1, $GUI_CHECKED)
ElseIf $spellnumberen = 2 Then
	GUICtrlSetState($spell1, $GUI_CHECKED)
	GUICtrlSetState($spell2, $GUI_CHECKED)
ElseIf $spellnumberen = 3 Then
	GUICtrlSetState($spell1, $GUI_CHECKED)
	GUICtrlSetState($spell2, $GUI_CHECKED)
	GUICtrlSetState($spell3, $GUI_CHECKED)
ElseIf $spellnumberen = 4 Then
	GUICtrlSetState($spell1, $GUI_CHECKED)
	GUICtrlSetState($spell2, $GUI_CHECKED)
	GUICtrlSetState($spell3, $GUI_CHECKED)
	GUICtrlSetState($spell4, $GUI_CHECKED)
ElseIf $spellnumberen = 5 Then
	GUICtrlSetState($spell1, $GUI_CHECKED)
	GUICtrlSetState($spell2, $GUI_CHECKED)
	GUICtrlSetState($spell3, $GUI_CHECKED)
	GUICtrlSetState($spell4, $GUI_CHECKED)
	GUICtrlSetState($spell5, $GUI_CHECKED)
ElseIf $spellnumberen = 6 Then
	GUICtrlSetState($spell1, $GUI_CHECKED)
	GUICtrlSetState($spell2, $GUI_CHECKED)
	GUICtrlSetState($spell3, $GUI_CHECKED)
	GUICtrlSetState($spell4, $GUI_CHECKED)
	GUICtrlSetState($spell5, $GUI_CHECKED)
	GUICtrlSetState($spell6, $GUI_CHECKED)
ElseIf $spellnumberen = 7 Then
	GUICtrlSetState($spell1, $GUI_CHECKED)
	GUICtrlSetState($spell2, $GUI_CHECKED)
	GUICtrlSetState($spell3, $GUI_CHECKED)
	GUICtrlSetState($spell4, $GUI_CHECKED)
	GUICtrlSetState($spell5, $GUI_CHECKED)
	GUICtrlSetState($spell6, $GUI_CHECKED)
	GUICtrlSetState($spell7, $GUI_CHECKED)
ElseIf $spellnumberen = 8 Then
	GUICtrlSetState($spell1, $GUI_CHECKED)
	GUICtrlSetState($spell2, $GUI_CHECKED)
	GUICtrlSetState($spell3, $GUI_CHECKED)
	GUICtrlSetState($spell4, $GUI_CHECKED)
	GUICtrlSetState($spell5, $GUI_CHECKED)
	GUICtrlSetState($spell6, $GUI_CHECKED)
	GUICtrlSetState($spell7, $GUI_CHECKED)
	GUICtrlSetState($spell8, $GUI_CHECKED)
ElseIf $spellnumberen = 9 Then
	GUICtrlSetState($spell1, $GUI_CHECKED)
	GUICtrlSetState($spell2, $GUI_CHECKED)
	GUICtrlSetState($spell3, $GUI_CHECKED)
	GUICtrlSetState($spell4, $GUI_CHECKED)
	GUICtrlSetState($spell5, $GUI_CHECKED)
	GUICtrlSetState($spell6, $GUI_CHECKED)
	GUICtrlSetState($spell7, $GUI_CHECKED)
	GUICtrlSetState($spell8, $GUI_CHECKED)
	GUICtrlSetState($spell9, $GUI_CHECKED)
EndIf
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", 465, 308, 80, 47)
$OKenhance = GUICtrlCreateButton("RUN", 475, 325, 60, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlSetState(-1, $GUI_CHECKED)


GUISetState()
While 1
	$msg = GUIGetMsg()
	If $msg = $OKenhance Then
		enhancec()
		enhancer()
	EndIf
	If $msg = $GUI_EVENT_CLOSE Then Exit

	If GUICtrlRead($spell1) > 3 Then
		$statusspell1 = GUICtrlRead($spell1) - 4
	ElseIf GUICtrlRead($spell1) < 3 Then
		$statusspell1 = GUICtrlRead($spell1)
	EndIf
	If GUICtrlRead($spell2) > 3 Then
		$statusspell2 = GUICtrlRead($spell2) - 4
	ElseIf GUICtrlRead($spell2) < 3 Then
		$statusspell2 = GUICtrlRead($spell2)
	EndIf
	If GUICtrlRead($spell3) > 3 Then
		$statusspell3 = GUICtrlRead($spell3) - 4
	ElseIf GUICtrlRead($spell3) < 3 Then
		$statusspell3 = GUICtrlRead($spell3)
	EndIf
	If GUICtrlRead($spell4) > 3 Then
		$statusspell4 = GUICtrlRead($spell4) - 4
	ElseIf GUICtrlRead($spell4) < 3 Then
		$statusspell4 = GUICtrlRead($spell4)
	EndIf
	If GUICtrlRead($spell5) > 3 Then
		$statusspell5 = GUICtrlRead($spell5) - 4
	ElseIf GUICtrlRead($spell5) < 3 Then
		$statusspell5 = GUICtrlRead($spell5)
	EndIf
	If GUICtrlRead($spell6) > 3 Then
		$statusspell6 = GUICtrlRead($spell6) - 4
	ElseIf GUICtrlRead($spell6) < 3 Then
		$statusspell6 = GUICtrlRead($spell6)
	EndIf
	If GUICtrlRead($spell7) > 3 Then
		$statusspell7 = GUICtrlRead($spell7) - 4
	ElseIf GUICtrlRead($spell7) < 3 Then
		$statusspell7 = GUICtrlRead($spell7)
	EndIf
	If GUICtrlRead($spell8) > 3 Then
		$statusspell8 = GUICtrlRead($spell8) - 4
	ElseIf GUICtrlRead($spell8) < 3 Then
		$statusspell8 = GUICtrlRead($spell8)
	EndIf
	If GUICtrlRead($spell9) > 3 Then
		$statusspell9 = GUICtrlRead($spell9) - 4
	ElseIf GUICtrlRead($spell9) < 3 Then
		$statusspell9 = GUICtrlRead($spell9)
	EndIf

	Local $spellnumber = $statusspell1 + $statusspell2 + $statusspell3 + $statusspell4 + $statusspell5 + $statusspell6 + $statusspell7 + $statusspell8 + $statusspell9 - 1

WEnd

Func enhancec()
	$fileenhance = FileOpen(@ProgramFilesDir & "\burnersware\Rogue Tools\include\vars\enhancevars.txt", 2)
	FileWrite($fileenhance, GUICtrlRead($speednumbere) & @CRLF)
	FileWrite($fileenhance, $spellnumber & @CRLF)
	FileClose($fileenhance)
EndFunc ;==>enhancec

Func enhancer()
	Run("Rogue Enhancing.exe")
	Exit
EndFunc ;==>enhancer

Func nowinres()
	MsgBox(4096, "Resolution Error", "Your current windows resolution is not supported _
			"  & @CRLF & " Please Switch To one of the four supported resolutions And restart Burners Rogue Tools Software"  & @CRLF & " These Include 800x600 & 1024x768 & 1280x1024 & 1600x1200 _
			" & @CRLF & " Thank You")
	Exit
EndFunc ;==>nowinres

